﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net.Sockets;

namespace LibGreen
{
	class SocketConnectionData
	{
		/// <summary>
		/// Encapsulates socket connection information
		/// </summary>

		private string _server = "";
		private int _port;
		private Socket _socket;
		private Delegate _callback;

		/// <summary>
		/// Gets the server to which to connect through the proxy
		/// </summary>
		public string Server
		{
			get { return _server; }
		}

		/// <summary>
		/// Gets the port to which to connect through the proxy
		/// </summary>
		public int Port
		{
			get { return _port; }
		}

		/// <summary>
		/// Gets or sets the socket being connected
		/// </summary>
		public Socket Socket
		{
			get { return _socket; }
			set { _socket = value; }
		}

		/// <summary>
		/// Gets the callback used to return socket information
		/// </summary>
		public Delegate Callback
		{
			get { return _callback; }
		}

		/// <summary>
		/// Initializes a new SocketConnectionData object
		/// </summary>
		public SocketConnectionData (string server, int port, Delegate callback)
		{
			_server = server;
			_port = port;
			_callback = callback;
		}
	}
}
